<?php
namespace app\common\validate;

use think\Validate;

class ExcellentValidate extends Validate
{
    protected $rule =   [
        'honorary_name'  => 'require|max:50',
        'start_time' => 'require',
        'end_time' => 'require',
		'description' => 'require|max:1000',
		'class_ids' => 'require',
		'sort'	=> 'require|number'
    ];
    
    protected $message  =   [
        'honorary_name.require' => '通知标题必须填写',
        'honorary_name.max'     => '通知标题最多不能超过50个字符',
		'class_ids.require'=> '图片必须填写',
		'sort.number' => '必须输入数字',
    ];
    
    protected $scene = [
        'add'  =>  ['honorary_name','class_ids','start_time','end_time','sort'],
        'edit'  => ['honorary_name','class_ids','start_time','end_time','sort'],
		'sort' => ['sort']
    ];
}
